package com.benyi.util;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

public class TextToArray {

	static public String text = "SPRINT PAPER PRODUCTS LTD\r\n" + 
			"MOTION VENTURES\r\n" + 
			"BETTER DAYS INDUSTRIES LTD\r\n" + 
			"CANAAN INDUSTRIES LTD\r\n" + 
			"HEMICO MERCHANTS LTD\r\n" + 
			"ALPINE PAPER CONVERTORS\r\n" + 
			"REAL TRUST COMPANY SMC LTD\r\n" + 
			"OLIVE KNITTINGS\r\n" + 
			"EDAT BROAD GROUP LTD\r\n" + 
			"EXCEPTIONAL INVESTMENTS LTD\r\n" + 
			"FANCY FINEST\r\n" + 
			"CRISNET LTD\r\n" + 
			"NAMUYOMBA SHARON\r\n" + 
			"NASYMA (u) LTD\r\n" + 
			"DVORA CREATIONS LTD\r\n" + 
			"ME AND YOU\r\n" + 
			"CRISNET LTD\r\n" + 
			"EXCEPTIONAL INVESTMENTS LTD\r\n" + 
			"NASYMA (u) LTD\r\n" + 
			"BETTER DAYS INDUSTRIES LTD\r\n" + 
			"SAFARI PRODUCTS LTD\r\n" + 
			"CANAAN INDUSTRIES LTD\r\n" + 
			"LUBEGA SHAMIM\r\n" + 
			"MOTION VENTURES\r\n" + 
			"MUKYALA PEACE LEAH\r\n" + 
			"OLIVE KNITTINGS\r\n" + 
			"BETTER DAYS INDUSTRIES LTD\r\n" + 
			"EXCEPTIONAL INVESTMENTS LTD\r\n" + 
			"ME AND YOU\r\n" + 
			"NAMUYOMBA SHARON\r\n" + 
			"SPRINT PAPER PRODUCTS LTD\r\n" + 
			"SIMBALAND INDUSTRIES LTD\r\n" + 
			"NAMULIRA ABIGAIL\r\n" + 
			"MOTION VENTURES\r\n" + 
			"LUBEGA SHAMIM\r\n" + 
			"JBER COFFEE LIMITED\r\n" + 
			"SAFARI CENTER RWANDA\r\n" + 
			"BETTER DAYS INDUSTRIES LTD\r\n" + 
			"KAKEETO DAN GRNERAL HARDWARE\r\n" + 
			"CRISNET LTD\r\n" + 
			"ME AND YOU\r\n" + 
			"NASYMA (u) LTD\r\n" + 
			"GIBRALTAR LOGISTICS\r\n" + 
			"FANCY FINEST\r\n" + 
			"NASYMA (u) LTD\r\n" + 
			"REAL TRUST COMPANY SMC LTD\r\n" + 
			"REAL TRUST COMPANY SMC LTD\r\n" + 
			"EDAT BROAD GROUP LTD\r\n" + 
			"HEMICO MERCHANTS LTD\r\n" + 
			"GIBRALTAR LOGISTICS\r\n" + 
			"EXCEPTIONAL INVESTMENTS LTD\r\n" + 
			"MOTION VENTURES\r\n" + 
			"LUBEGA SHAMIM\r\n" + 
			"CANAAN INDUSTRIES LTD\r\n" + 
			"SPRINT PAPER PRODUCTS LTD\r\n" + 
			"MG HOLAINGS\r\n" + 
			"MUKYALA PEACE LEAH\r\n" + 
			"SAFARI CENTER RWANDA\r\n" + 
			"NAMUYOMBA SHARON\r\n" + 
			"MUKYALA PEACE LEAH\r\n" + 
			"RAMA INDUSTRIES\r\n" + 
			"SPAZ TISSUE\r\n" + 
			"BETTER DAYS INDUSTRIES LTD\r\n" + 
			"NASYMA (u) LTD\r\n" + 
			"ALPAINE PAPER CONVERTORS\r\n" +  
			"BETH GLOBAL SUPPLIES\r\n" + 
			"EXCEPTIONAL INVESTMENTS LTD\r\n" + 
			"OLIVE KNITTINGS\r\n" + 
			"MEDICOTT INDUSTRIES (U) LTD\r\n" + 
			"CANAAN INDUSTRIES LTD\r\n" + 
			"EDAT BROAD GROUP LTD\r\n" + 
			"NTAKE BAKERY company ltd\r\n" + 
			"SAFARI PRODUCTS LTD\r\n" + 
			"MOTION VENTURES\r\n" + 
			"BETTER DAYS INDUSTRIES LTD\r\n" + 
			"NASYMA (u) LTD\r\n" + 
			"SPRINT PAPER PRODUCTS LTD\r\n" + 
			"SIMBALAND INDUSTRIES LTD\r\n" + 
			"LUBEGA SHAMIM\r\n" + 
			"FANCY FINEST\r\n" + 
			"HEMICO MERCHANTS LTD\r\n" + 
			"CONQUER INVESTMENT CO. LTD\r\n" + 
			"MOTION VENTURES\r\n" + 
			"REAL TRUST COMPANY SMC LTD\r\n" + 
			"GIBRALTAR LOGISTICS\r\n" + 
			"BETTER DAYS INDUSTRIES LTD\r\n" + 
			"STEPHEN GATHITU\r\n" + 
			"DVORA CREATIONS LTD\r\n" + 
			"HARREE HARDWARE (U) LTD\r\n" + 
			"BAIL LI PAPER CO LTD\r\n" + 
			"CANAAN INDUSTRIES LTD\r\n" + 
			"EXCEPTIONAL INVESTMENTS LTD\r\n" + 
			"XUBA COMPANY\r\n" + 
			"KWIKWI PETER\r\n" + 
			"OLIVE KNITTINGS\r\n" + 
			"";
	static public class Cp implements Comparator<String>{
		public Cp() {
			//
		}
		public int compare(String o1, String o2) {
			return o1.compareTo(o2);
		}
		public boolean equals(Object obj) {
			return this.equals(obj);
		}
	}
	
	public static List<String> getArray() {
		ArrayList<String> ls = new ArrayList<String>();
		String line = text.toUpperCase();
		String []as = line.split("\r\n");
		String one;
		for(int i=0;i<as.length;i++) {
			one = as[i];
			one = one.trim();
			int len1,len2;
			do{
				len1 = one.length();
				one=one.replace("  ", " ");
				len2 = one.length();
			}while(len1 != len2);
			boolean find = false;
			for(int j=0;j<ls.size();j++) {
				if(one.equals(ls.get(j))){
					find =true;
					break;
				}
			}
			if(!find) {
				ls.add(one);
			}
		} 
		return ls;
	}
	
	public static void main(String []args) {
		List<String> ls = getArray();
		ls.sort(new Cp());
		for(int i=0;i<ls.size();i++) {
			System.out.println("\""+ls.get(i)+"\",");
		}
		
	}
	
}
